package com.example.yan.java字符串;

public class SearchStringEmp {

    //字符串搜索
    public static void main(String[] args) {
        String strOrig = "Google Nowcoder Taobao";
        int intIndex = strOrig.indexOf("Nowcoder");
        if(intIndex == - 1){
            System.out.println("没有找到字符串 Nowcoder");
        }else{
            System.out.println("Nowcoder 字符串位置 " + intIndex);
        }
    }
}
